package com.dc.designPattern._23_specification.impl.step3.spec;

import com.dc.designPattern._23_specification.impl.step3.User;

/**
 * Description: 用户规格实现_用户年龄大于age
 * @author: gdc
 * @date: 2021/8/20
 * @version 1.0
 */
public class UserByAgeThan extends BaseUserSpecification {

    private Integer age;

    public UserByAgeThan(Integer age) {
        this.age = age;
    }

    @Override
    public boolean isSatisfiedBy(User user) {
        return user.getAge() > age;
    }

}
